<%--
  Created by IntelliJ IDEA.
  User: xuweijie
  Date: 17-5-11
  Time: 下午12:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/header.jsp" %>
<input type="text" value="${pageIndex}" hidden id="pageIndex">
<input type="text" value="${pageCount}" hidden id="pageCount">
<input type="text" value='${jsonObject}' hidden id="jsonObject">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend style="font-size: 14px;">
            <form class="layui-form" method="post" action="querylist" name="search">
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <input name="croCustomerVo.username" id="customername" lay-verify="" autocomplete="off" value="${recroCustomerVo.username}"
                               placeholder="请输入用户名" class="layui-input" type="text">
                    </div>&nbsp;
                    <div class="layui-input-inline">
                        <select  name="croCustomerVo.type" id="customertype">
                            <option value="">会员类型</option>
                            <c:forEach items="${SysDict['customer_type']}" var="type">
                                <c:if test="${recroCustomerVo.type==type.key}">
                                    <option value="${type.key}" selected>${type.value}</option>
                                </c:if>
                                <c:if test="${recroCustomerVo.type!=type.key}">
                                    <option value="${type.key}">${type.value}</option>
                                </c:if>
                            </c:forEach>
                        </select>
                    </div>&nbsp;
                    <div class="layui-input-inline">
                        <select  name="croCustomerVo.status" id="customerstatus">
                            <option value="">用户状态</option>
                            <c:forEach items="${SysDict['customer_status']}" var="status">
                                <c:if test="${recroCustomerVo.status==status.key}">
                                    <option value="${status.key}" selected>${status.value}</option>
                                </c:if>
                                <c:if test="${recroCustomerVo.status!=status.key}">
                                    <option value="${status.key}">${status.value}</option>
                                </c:if>

                            </c:forEach>
                        </select>
                    </div>&nbsp;
                    <div class="layui-input-inline">
                        <input name="croCustomerVo.phone"  lay-verify="" autocomplete="off" value="${recroCustomerVo.phone}"
                               placeholder="请输入手机号码" class="layui-input" type="text">
                    </div>&nbsp;
                    <div class="layui-input-inline">
                        <input name="croCustomerVo.email"  lay-verify="" autocomplete="off" value="${recroCustomerVo.email}"
                               placeholder="请输入邮箱" class="layui-input" type="text">
                    </div>&nbsp;
                    <div class=" layui-inline">
                        <label class="layui-form-label">注册日期</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input value="${recroCustomerVo.startdate}" name="croCustomerVo.startdate" class="layui-input" placeholder="起始日期" onclick="layui.laydate({elem: this, festival: true})">
                        </div>
                        <div class="layui-form-mid">:</div>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input value="${recroCustomerVo.enddate}" name="croCustomerVo.enddate" class="layui-input" placeholder="结束日期" onclick="layui.laydate({elem: this, festival: true})">
                        </div>
                    </div>&nbsp;
                    <input type="submit" id="search" class="layui-btn layui-btn-normal btn-search" value="搜索">
                </div>
            </form>
        </legend>
</fieldset>

<table class="layui-table" lay-even="" lay-skin="row">
    <colgroup>
        <col width="50">
        <col width="90">
        <col width="70">
        <col width="50">
        <col width="60">
        <col width="40">
        <col width="50">
        <col width="50">
        <col width="50">
        <col width="110">
        <col width="110">
        <col width="160">
    </colgroup>
    <thead>
    <tr>
        <th>序号</th>
        <th>用户名</th>
        <th>类型</th>
        <th>状态</th>
        <th>头像</th>
        <th>性别</th>
        <th>电话</th>
        <th>邮箱</th>
        <th>账户余额(元)</th>
        <th>注册日期</th>
        <th>更新日期</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:set var="i" value="${0}" />
    <c:forEach items="${croCustomers}" var="customer">
        <tr>
            <c:set var="i" value="${i+1}" />
            <td>${i}</td>
            <td>${customer.username}</td>
            <td>${SysDict['customer_type'][customer.type]}</td>
            <td>${SysDict['customer_status'][customer.freeze_flag]}</td>
            <td><img src="${customer.photo}" width="32" height="32"></td>
            <td>${customer.sex}</td>
            <td>${customer.phone}</td>
            <td>${customer.email}</td>
            <td>${customer.balance}</td>
            <td><fmt:formatDate value="${customer.signdate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
            <td><fmt:formatDate value="${customer.updatedate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
            <td>
                <div class="layui-btn-group">
                    <a data-method="look" customerid="${customer.id}" class="layui-btn layui-btn-small lookcus">查看</a>
                    <a data-method="delete" customerid="${customer.id}" class="layui-btn  layui-btn-small layui-btn-danger delcus">删除</a>
                    <c:if test="${customer.freeze_flag==0}">
                        <a data-method="freeze" customerid="${customer.id}" freeze_flag="1" class="layui-btn  layui-btn-small  layui-btn-warm freezecus">冻结</a>
                    </c:if>
                    <c:if test="${customer.freeze_flag==1}">
                        <a data-method="freeze" customerid="${customer.id}" freeze_flag="0" class="layui-btn  layui-btn-small  layui-btn-warm freezecus">解冻</a>
                    </c:if>
                    <a data-method="buycar" customerid="${customer.id}" class="layui-btn  layui-btn-small layui-btn-normal lookbuycar">购物车</a>
                </div>
        </tr>
    </c:forEach>
    </tbody>
</table>
<%--分页显示区域--%>
<div id="fullpage"></div>


